package org.jeecg.modules.mg.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.mg.DateUtil;
import org.jeecg.modules.mg.entity.SecurityCode;
import org.jeecg.modules.mg.entity.StockDaily;
import org.jeecg.modules.mg.service.IStockDailyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author dinggang
 * @since 2021-02-17
 */
@RestController
@RequestMapping("/mg/stock-daily")
public class StockDailyController {

    @Autowired
    private IStockDailyService stockDailyService;

    @GetMapping("/{code}")
    @ApiImplicitParams(@ApiImplicitParam(name = "code", required = true))
    @ApiOperation("所有股票代码")
    public Result<?> allCode(@PathVariable String code) {
        return Result.OK(stockDailyService.getByCode(code));
    }

}

